Herb Gross illustrates how to translate the input->program->output model into an algebraic equation. He also illustrates how to find the input if you are given the output. This material and much more is also available online at www.adjectivenounmath.com.